import { defineStore } from "pinia";
export const useMainStore = defineStore("main", {
  persist: false, // 持久化存储
  state: () => {
    return {
      layers: [
        {
          id: 1,
          type: "marker",
          visible: true,
          name: "人员图层",
          icon: "https://xunjinasd.oss-cn-hangzhou.aliyuncs.com/app/space/78dfd3bd4b0a413197fa82811cf18d04_file14.png",
          children: [
            {
              id: 0,
              size: 15,
              pos: { longtitude: 120.153576, latitude: 30.287459 },
              properties: {
                userData: [
                  {
                    label: "姓名",
                    value: "chengbo"
                  },
                  {
                    label: "ID 号",
                    value: "RH004"
                  },
                  {
                    label: "所属单位",
                    value: "安保部"
                  },
                  {
                    label: "用户类型",
                    value: "移动用户"
                  },
                  {
                    label: "工号",
                    value: "003"
                  }
                ]

              }
            },
            {
              id: 1,
              size: 15,
              pos: { longtitude: 120.253576, latitude: 30.387459 },
              properties: {
                userData: [
                  {
                    label: "姓名",
                    value: "chengbo"
                  },
                  {
                    label: "ID 号",
                    value: "RH004"
                  },
                  {
                    label: "所属单位",
                    value: "安保部"
                  },
                  {
                    label: "用户类型",
                    value: "移动用户"
                  },
                  {
                    label: "工号",
                    value: "003"
                  }
                ]

              }
            },
          ],
        },
        {
          id: 2,
          name: "设备图层",
          type: "marker",
          visible: true,
          children: [
            {
              id: 2,
              size: 15,
              pos: { longtitude: 121.153576, latitude: 30.287459 },
            },
            {
              id: 3,
              size: 15,
              pos: { longtitude: 120.253576, latitude: 31.387459 },
            },
          ],
        },
        {}
      ],
      guidLine: {
        id: 5,
        properties: { color: '#ffffff', width: 5 },
        content: [

        ],
      },
      userInfo: {
        "ddtinfo": {
          "ddtid": 70000176,
          "ddtmm": "",
          "zxbz": 0,
          "ddtmz": "RHTX01",
          "ddyjs": 3,
          "UnitId": "120002"
        },
        "sphyPort": 15675,
        "IP": "1.116.178.22",
        "voipPort": 5065,
        "cmd": {
          "LOGIN_TIME": "2023-10-07 11:05:47",
          "UNIT_ID": "120002",
          "MSG_UNIT_ID": "120002",
          "DEV_TYPE": "WEB",
          "LOCATE_QUEUE_NAME": "70000176_LOCATE",
          "LOCATE_QUEUE_ROUTE": "LOCATE.1000.120002.#",
          "POLICE_ID": "70000176",
          "IM_ROUTINGKEY": "IM.broadcast",
          "HOST": "t01md.com.cn",
          "POLICE_NAME": "RHTX01",
          "EXCHANGENAME": "120002",
          "IMEXCHANGE_ROUTE": "IM.UNIT_120002",
          "result": "1",
          "STATUS": "1",
          "UNIT_NAME": "RHTX",
          "GENDER": "",
          "USERNAME": "t01",
          "TOKEN": "991d1b21f8eb2cb0255d487f68b0b88e",
          "IMEXCHANGE_NAME": "IMExchange",
          "Msg": "991d1b21f8eb2cb0255d487f68b0b88e",
          "IM_EXCHANGENAME": "IMExchange",
          "VHOST": "/",
          "EXCHANGENAME_POWER": "",
          "PORT": "15675",
          "VISIBLE_TAB": "",
          "POLICE_POST": "",
          "IMEI": "a4b74538a80a522343d18e90e46b52f6",
          "ROUTINGKEY": "FACE.1000.120002.#,ALARM.1000.120002.#,LOGIN_OUT.*,POLICE.#.70000176.#,PC.1000.120002.#,UNIT.#.120002",
          "UNIT_SIGN": "1ac757c793fdab006426e70828bd8a17",
          "CATEGORY_SIGN": "290fec0a24e8a5622a00012f317dfb36",
          "PWS": "t01",
          "MD_INFO": "{\"result\":1,\"PORT\":\"5065\",\"USR\":\"70000176\",\"HOST\":\"192.168.60.29\",\"PWS\":\"1234\"}",
          "MOBILE_NO": "",
          "POLICE_SIGN": "69ef2a88c3af1468a4459bc8b86a3a1b",
          "CARD_ID": "",
          "PROGRAMME_ID": ""
        },
        "sphyIP": "www.t01md.com.cn",
        "voipIP": "t01md.com.cn",
        "sphyQz": "84"
      },
      fillMode: 0,
      // 选择的人员
      selected: [],
      // name
      Username: '',
      // 密码
      UserPassword: '',
      // 控制路由
      handeRouter: false,
      // 控制路由是否正常登录
      // normalLogin: true
      resData:{},
      // token
      getToken : '',
      // getrefreshToken
      getrefreshToken:'',
      // 验证码
      captchaId:'',
      verifyCode:'',

      // 控制弹窗是否显示
      showModel:false,
      // 控制第二弹窗是否显示
      showModelB:false,
      // echarts大屏
      showModelC:false,
      // echarts中间大屏
      showModelD:false,
      // 控制点图层显隐
      showPonit:false,
      // 测试数据
      testArray:[]
    };
  },
  getters: {},
  actions: {},
});
